/** 
  实习进展情况 
*/
<template>
  <div>
    <inner-breadcrumb
        v-model="key"
        :path="{
        label:'实习进展情况',
        key: 'internshipList',
        children:[
          {
            key: 'newInternship',
            label:'实习进展新增',
          },
          {
            key: 'editInternship',
            label:'实习进展编辑',
          },
          {
            key: 'detailsInternship',
            label:'实习进展详情',
          },
         {
            key: 'mentorReview',
            label:'校内导师审核',
          },
          {
            key: 'tutorReview',
            label:'校外导师审核',
          },
        ]
        }"
        />
      <div class="edu-page-warp" v-if="key=='internshipList'">

        <condition-card @reset="resetSearch" @search="onSearch" label-position="right" label-width="150px">
          <el-row :gutter="24" style="height: 50px;">
            <el-col :span="8">
              <el-form-item :label="$t('internship.internshipBase')">
                  <el-input v-model="queryForm.condition.baseName" style="width: 100%"></el-input>
                </el-form-item>
            </el-col>
            <!-- <el-col :span="8">
              <el-form-item :label="$t('graduate.trainingLevel')">
                <el-select collapse-tags v-model="queryForm.condition.trainingLevelList" clearable multiple filterable style="width: 100%">
                    <el-option
                        v-for="item in options.TrainingLevel"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                    </el-option>
                </el-select>
              </el-form-item>
            </el-col> -->
            <el-col :span="8">
                <el-form-item :label="$t('graduate.college')">
                    <el-select collapse-tags v-model="queryForm.condition.collegeAcademyList" @change="collegeChange" multiple filterable clearable style="width: 100%">
                        <el-option
                            v-for="item in options.faculty"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                        </el-option>
                    </el-select>
                </el-form-item>
            </el-col>
            <el-col :span="8">
                <el-form-item :label="$t('graduate.major')">
                    <el-select collapse-tags v-model="queryForm.condition.majorList" @change="majorChange" multiple filterable clearable style="width: 100%">
                        <el-option
                            v-for="item in options.profession"
                            :key="item.code"
                            :label="item.name"
                            :value="item.code">
                        </el-option>
                    </el-select>
                </el-form-item>
            </el-col>
            <el-col :span="8">
                <el-form-item :label="$t('internship.currentStatus')">
                  <el-select v-model="queryForm.condition.status" style="width: 100%" clearable >
                    <el-option label="校外导师审核" :value="0"> </el-option>
                    <el-option label="导师审核" :value="1"> </el-option>
                    <el-option label="已审核" :value="2"> </el-option>
                    <el-option label="已驳回" :value="3"> </el-option>
                  </el-select>
                </el-form-item>
            </el-col>
            <el-col :span="8">
                <el-form-item :label="$t('internProgress.planMonth')" size="small">
                  <el-date-picker 
                    v-model="queryForm.condition.reportMonthStart"
                    type="month"
                    style="width: 100%"
                    placeholder="请选择" value-format="yyyy-MM" format="yyyy-MM">
                  </el-date-picker>
                </el-form-item>
            </el-col>
            <el-col :span="8">
                <el-form-item :label="$t('internProgress.planMonthStop')" size="small">
                  <el-date-picker
                  style="width: 100%"
                    v-model="queryForm.condition.reportMonthEnd"
                    type="month"
                    placeholder="请选择" value-format="yyyy-MM" format="yyyy-MM">
                  </el-date-picker >
                </el-form-item>
            </el-col>
          </el-row>
        </condition-card>
        <el-card shadow="never" v-loading="loading" body-style="padding: 24px;" class="card-margin">
          <h1 class="condition-title">{{$t('internProgress.internProgressList')}}</h1>
          <div class="float-left associated-conditional-input">
              <KeywordInput
                v-model="queryForm.condition.studentIdOrName "
                :placeholder="$t('internProgress.pleasesSearch')"
                @enter="onSearch"/>
          </div>
          <div class="edu-opertion-bar sub-title">
            <div class="float-right" style="display: flex;">
              <el-button style="margin-left:10px" v-if='deriveBtn' type="primary" @click="exportFile">{{$t('internship.derive')}}</el-button>
              <el-button type="primary" v-if='addBtn' @click="exportAdd">{{$t('graduate.add')}}</el-button>
           
            </div>
          </div>
          <edu-table :pagination="false"  :order='false' :tooltipEffect="tooltipEffect" stripe :data="dataList" size="mini" @selection-change="handleSelectionChange">
            <edu-table-column :label="$t('internProgress.studentNumber')" prop="studentId"></edu-table-column>
            <edu-table-column :label="$t('internProgress.studentName')" prop="name"></edu-table-column>
            <edu-table-column :label="$t('graduate.college')" prop="collegeAcademyStr"></edu-table-column>
          
            <edu-table-column :label="$t('graduate.major')" prop="majorStr"></edu-table-column>
            <edu-table-column :label="$t('internProgress.fillMonth')" prop="reportMonth"></edu-table-column>
            <edu-table-column :label="$t('internProgress.internshipBase')" prop="baseName"></edu-table-column>
            <edu-table-column :label="$t('internProgress.namePost')" prop="positionName"></edu-table-column>
            <edu-table-column :label="$t('internProgress.states')" prop="status">
              <template slot-scope="props">
                <span v-if="props.row.status == 0">校外导师审核</span>
                <span v-if="props.row.status == 1">导师审核</span>
                <span v-if="props.row.status == 2">已审核</span>
                <span v-if="props.row.status == 3">已驳回</span>
              </template>
            </edu-table-column>
           
            <edu-table-column :label="$t('graduate.operate')" fit width="150">
              <template slot-scope="props">
              <el-row v-if='props.row.status == 0&&teacher=="3.2" || props.row.status == 1&&teacher=="3.1"'>

                <el-button v-if='auditBtn&&props.row.status!=3' :disabled="props.row.status == 2" type="text" @click="checkOutline(props.row)" >{{$t('internProgress.check')}}</el-button>
              </el-row>
                <el-button v-if='props.row.status==3&&editBtn' type="text" @click="editOutline(props.row)" >{{$t('internProgress.edit')}}</el-button>
                <el-button v-if='detailsBtn' type="text" @click="detailsOutline(props.row)" >{{$t('internProgress.details')}}</el-button>
            
              </template>
            </edu-table-column>
          </edu-table>
          <el-row type="flex" class="row-bg" justify="end">
            <el-col>
                <el-pagination
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="queryForm.pageNum_"
                  :page-sizes="[20, 40, 80, 100]"
                  :page-size="queryForm.pageSize_"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="queryForm.total_"
                  style="float:right;margin-top:10px"
                ></el-pagination>
            </el-col>
          </el-row>
        </el-card>
       
        <edu-export-dialog
          :disabled="exportButton"
          :title="$t('message.prompt')"
          ref="downloadRef"
          :data="exportResult">
        </edu-export-dialog>
      </div>
      <div class="edu-page-warp" v-if="key=='newInternship'">
        <el-card v-loading="loading" body-style="padding: 24px;" class="card-margin">
          <h2 style="font-weight:bold">{{$t('internProgress.internCompletion')}}</h2>
          <hr style="border-top: 2px solid #eee;">
         <div style="padding: 0px 18px;">

          <div  style="display: flex;justify-content: space-between;margin-bottom: 7px;">
            <p class="base-info-title">{{$t('internProgress.information')}}</p>
          </div>
          <table class="table-style-baseinfo">
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.name')}}:</td>
                  <td class="text-left-background-none">{{dataForm.name}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.studentNumber')}}:</td>
                  <td class="text-left-background-none">{{dataForm.studentId}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.college')}}:</td>
                  <td class="text-left-background-none">{{dataForm.collegeAcademy | collegeList(options.faculty)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.profession')}}:</td>
                  <td class="text-left-background-none">{{dataForm.major|collegeList(options.profesList)}}</td>
              </tr>
              <tr>
                <td class="text-right-background-color">{{$t('internProgress.trainingLevel')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingLevel|collegeList(options.TrainingLevel)}}</td>
                <td class="text-right-background-color">{{$t('internProgress.cultivationCategory')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingCategory|collegeList(options.trainingCategory)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.degreeType')}}:</td>
                  <td class="text-left-background-none">{{dataForm.degreeType|collegeList(options.degreeType)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.waysOfLearning')}}:</td>
                  <td class="text-left-background-none">{{dataForm.formLearning|collegeList(options.formLearning)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.grade')}}:</td>
                  <td class="text-left-background-none">{{dataForm.currentGrade}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.mentor')}}:</td>
                  <td class="text-left-background-none">{{dataForm.teacherName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.category')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.professional')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorField}}</td>
                  
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipBase')}}:</td>
                  <td class="text-left-background-none">{{dataForm.baseName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.namePost')}}:</td>
                  <td class="text-left-background-none">{{dataForm.positionName}}</td>
                  
              </tr>
             
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.supervisor')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.outsideAdvisorName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipProgram')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.practiceContent}}</td>
              </tr>
              
          </table>
         </div>
        </el-card>
        <el-card body-style="padding: 24px;" class="card-margin">
          <div style="padding: 0px 18px;">
             <h2 style="font-weight:bold">{{$t('internProgress.write')}}</h2>
             <el-form :model="internForm" label-width="114px" :rules="rules" ref="addform" label-suffix="：">
                <el-row >
                  <el-form-item :label="$t('internProgress.fillMonth')" prop="reportMonth">
                    <el-date-picker 
                      v-model="internForm.reportMonth"
                      type="month"
                      style="width: 30%"
                      placeholder="请选择" value-format="yyyy-MM" format="yyyy-MM">
                    </el-date-picker>
                  </el-form-item>
                </el-row>
                <el-row >
                  <el-form-item :label="$t('internship.adjunct')" prop="enclosureFileName">
                    <el-upload
                      class="upload-demo"
                      v-model="internForm.enclosureFileName"
                      action="api/commonservice/obsfile/uploadfile"
                      :headers="{'X-Token': $store.state.session.sessionid}"
                      :data="{bucketname: 'face', folderpath: 'file'}"
                      :on-change="handleChange"
                      :on-remove="handleRemove"
                      :on-success="handleSuccess"
                      :limit="1"
                      :file-list="fileList">
                      <el-button size="small" type="primary">{{$t('internship.selectFile')}}</el-button>
                    </el-upload>
                  </el-form-item>
                </el-row>
                <el-row >
                  <el-form-item :label="$t('internProgress.internProgress')" prop="content">
                    <el-input
                      maxlength="1000"
                      type="textarea"
                      :rows="5"
                      v-model="internForm.content" >
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row type="flex" class="row-bg" justify="end">
                  <el-button @click="cancelDialogList" >{{$t('graduate.cancel')}}</el-button>
              
                  <el-button type="danger"  @click="affirmForm" >{{$t('graduate.submit')}}</el-button>
                </el-row>
              </el-form>
          </div>
          
        </el-card>
      </div>
      <div class="edu-page-warp" v-if="key=='editInternship'">
        <el-card v-loading="loading" body-style="padding: 24px;" class="card-margin">
          <h2 style="font-weight:bold">{{$t('internProgress.internCompletion')}}</h2>
          <hr style="border-top: 2px solid #eee;">
         <div style="padding: 0px 18px;">

          <div  style="display: flex;justify-content: space-between;margin-bottom: 7px;">
            <p class="base-info-title">{{$t('internProgress.information')}}</p>
          </div>
          <table class="table-style-baseinfo">
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.name')}}:</td>
                  <td class="text-left-background-none">{{dataForm.name}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.studentNumber')}}:</td>
                  <td class="text-left-background-none">{{dataForm.studentId}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.college')}}:</td>
                  <td class="text-left-background-none">{{dataForm.collegeAcademy | collegeList(options.faculty)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.profession')}}:</td>
                  <td class="text-left-background-none">{{dataForm.major|collegeList(options.profesList)}}</td>
              </tr>
              <tr>
                <td class="text-right-background-color">{{$t('internProgress.trainingLevel')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingLevel|collegeList(options.TrainingLevel)}}</td>
                <td class="text-right-background-color">{{$t('internProgress.cultivationCategory')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingCategory|collegeList(options.trainingCategory)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.degreeType')}}:</td>
                  <td class="text-left-background-none">{{dataForm.degreeType|collegeList(options.degreeType)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.waysOfLearning')}}:</td>
                  <td class="text-left-background-none">{{dataForm.formLearning|collegeList(options.formLearning)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.grade')}}:</td>
                  <td class="text-left-background-none">{{dataForm.currentGrade}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.mentor')}}:</td>
                  <td class="text-left-background-none">{{dataForm.teacherName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.category')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.professional')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorField}}</td>
                  
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipBase')}}:</td>
                  <td class="text-left-background-none">{{dataForm.baseName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.namePost')}}:</td>
                  <td class="text-left-background-none">{{dataForm.positionName}}</td>
                  
              </tr>
              <!-- <tr>
              <td class="text-left-background-none" colspan="4" ></td>
              </tr> -->
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.supervisor')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.outsideAdvisorName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipProgram')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.practiceContent}}</td>
              </tr>
              
          </table>
         </div>
        </el-card>
        <el-card body-style="padding: 24px;" class="card-margin">
          <div style="padding: 0px 18px;">
             <h2 style="font-weight:bold">{{$t('internProgress.write')}}</h2>
             <el-form :model="internForm" label-width="114px" :rules="rules" ref="addform" label-suffix="：">
                <el-row >
                  <el-form-item :label="$t('internProgress.fillMonth')" prop="reportMonth">
                    <el-date-picker 
                      v-model="internForm.reportMonth"
                      type="month"
                      style="width: 30%"
                      placeholder="请选择" value-format="yyyy-MM" format="yyyy-MM">
                    </el-date-picker>
                  </el-form-item>
                </el-row>
                <el-row >
                  <el-form-item :label="$t('internship.adjunct')" prop="enclosureFileName">
                    <el-upload
                      class="upload-demo"
                      v-model="internForm.enclosureFileName"
                      action="api/commonservice/obsfile/uploadfile"
                      :headers="{'X-Token': $store.state.session.sessionid}"
                      :data="{bucketname: 'face', folderpath: 'file'}"
                      :on-change="handleChange"
                      :on-remove="handleRemove"
                      :on-success="handleSuccess"
                      :limit="1"
                      :file-list="fileList">
                      <el-button size="small" type="primary">{{$t('internship.selectFile')}}</el-button>
                    
                    </el-upload>
                  </el-form-item>
                </el-row>
                <el-row >
                  <el-form-item :label="$t('internProgress.internProgress')" prop="content">
                    <el-input
                      maxlength="1024"
                      type="textarea"
                      :rows="5"
                      v-model="internForm.content" >
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row type="flex" class="row-bg" justify="end">
                  <el-button @click="cancelDialogList" >{{$t('graduate.cancel')}}</el-button>
               
                  <el-button type="danger"  @click="editirmForm" >{{$t('graduate.submit')}}</el-button>
                </el-row>
              </el-form>
          </div>
          
        </el-card>
      </div>
      <div class="edu-page-warp" v-if="key=='detailsInternship'">
        <el-card v-loading="loading" body-style="padding: 24px;" class="card-margin">
          <h2 style="font-weight:bold">{{$t('internProgress.internCompletion')}}</h2>
          <hr style="border-top: 2px solid #eee;">
         <div style="padding: 0px 18px;">

          <div  style="display: flex;justify-content: space-between;margin-bottom: 7px;">
            <p class="base-info-title">{{$t('internProgress.information')}}</p>
          </div>
          <table class="table-style-baseinfo">
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.name')}}:</td>
                  <td class="text-left-background-none">{{dataForm.name}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.studentNumber')}}:</td>
                  <td class="text-left-background-none">{{dataForm.studentId}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.college')}}:</td>
                  <td class="text-left-background-none">{{dataForm.collegeAcademy | collegeList(options.faculty)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.profession')}}:</td>
                  <td class="text-left-background-none">{{dataForm.major|collegeList(options.profesList)}}</td>
              </tr>
              <tr>
                <td class="text-right-background-color">{{$t('internProgress.trainingLevel')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingLevel|collegeList(options.TrainingLevel)}}</td>
                <td class="text-right-background-color">{{$t('internProgress.cultivationCategory')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingCategory|collegeList(options.trainingCategory)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.degreeType')}}:</td>
                  <td class="text-left-background-none">{{dataForm.degreeType|collegeList(options.degreeType)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.waysOfLearning')}}:</td>
                  <td class="text-left-background-none">{{dataForm.formLearning|collegeList(options.formLearning)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.grade')}}:</td>
                  <td class="text-left-background-none">{{dataForm.currentGrade}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.mentor')}}:</td>
                  <td class="text-left-background-none">{{dataForm.teacherName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.category')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.professional')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorField}}</td>
                  
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipBase')}}:</td>
                  <td class="text-left-background-none">{{dataForm.baseName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.namePost')}}:</td>
                  <td class="text-left-background-none">{{dataForm.positionName}}</td>
                  
              </tr>
              <!-- <tr>
              <td class="text-left-background-none" colspan="4" ></td>
              </tr> -->
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.supervisor')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.outsideAdvisorName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipProgram')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.practiceContent}}</td>
              </tr>
              
          </table>
         </div>
        </el-card>
        <el-card body-style="padding: 24px;" class="card-margin">
          <div style="padding: 0px 18px;">
             <h2 style="font-weight:bold">{{$t('internProgress.write')}}</h2>
             <el-form :model="internForm" label-width="114px" :rules="rules" ref="addform" label-suffix="：">
                <el-row >
                  <el-form-item :label="$t('internProgress.fillMonth')" prop="reportMonth">
                    <el-date-picker 
                      v-model="internForm.reportMonth"
                      type="month"
                      disabled
                      style="width: 30%"
                      placeholder="请选择" value-format="yyyy-MM" format="yyyy-MM">
                    </el-date-picker>
                  </el-form-item>
                </el-row>
                <el-row >
                  <el-form-item :label="$t('internship.adjunct')" prop="enclosureFileName">
                    <el-upload
                      class="upload-demo"
                      v-model="internForm.enclosureFileName"
                      action="api/commonservice/obsfile/uploadfile"
                      :headers="{'X-Token': $store.state.session.sessionid}"
                      :data="{bucketname: 'face', folderpath: 'file'}"
                      :on-change="handleChange"
                      :on-remove="handleRemove"
                      :on-preview='handlePreview'
                      :on-success="handleSuccess" disabled
                      :limit="1"
                      :file-list="fileList">
                      <el-button disabled size="small" type="primary">{{$t('internship.selectFile')}}</el-button>
                    
                    </el-upload>
                  </el-form-item>
                </el-row>
                <el-row >
                  <el-form-item :label="$t('internProgress.internProgress')" prop="content">
                    <el-input
                      maxlength="1024"
                      type="textarea"
                      :rows="5" disabled
                      v-model="internForm.content" >
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row type="flex" class="row-bg" justify="end">
                  <el-button @click="cancel=key='internshipList'" >{{$t('graduate.cancel')}}</el-button>
               
                  <el-button type="danger" disabled  @click="editirmForm" >{{$t('graduate.submit')}}</el-button>
                </el-row>
              </el-form>
          </div>
          
        </el-card>
      </div>
      <div class="edu-page-warp" v-if="key=='mentorReview'">
        <el-card v-loading="loading" body-style="padding: 24px;" class="card-margin">
          <el-row type="flex" class="row-bg" justify="space-between">

            <h2 style="font-weight:bold">{{$t('internProgress.internCompletion')}}</h2>
            <el-button @click="cancelIntern" >{{$t('graduate.cancel')}}</el-button>
          </el-row>
          <hr style="border-top: 2px solid #eee;">
         <div style="padding: 0px 18px;">

          <div  style="display: flex;justify-content: space-between;margin-bottom: 7px;">
            <p class="base-info-title">{{$t('internProgress.information')}}</p>
          </div>
          <table class="table-style-baseinfo">
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.name')}}:</td>
                  <td class="text-left-background-none">{{dataForm.name}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.studentNumber')}}:</td>
                  <td class="text-left-background-none">{{dataForm.studentId}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.college')}}:</td>
                  <td class="text-left-background-none">{{dataForm.collegeAcademy | collegeList(options.faculty)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.profession')}}:</td>
                  <td class="text-left-background-none">{{dataForm.major|collegeList(options.profesList)}}</td>
              </tr>
              <tr>
                <td class="text-right-background-color">{{$t('internProgress.trainingLevel')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingLevel|collegeList(options.TrainingLevel)}}</td>
                <td class="text-right-background-color">{{$t('internProgress.cultivationCategory')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingCategory|collegeList(options.trainingCategory)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.degreeType')}}:</td>
                  <td class="text-left-background-none">{{dataForm.degreeType|collegeList(options.degreeType)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.waysOfLearning')}}:</td>
                  <td class="text-left-background-none">{{dataForm.formLearning|collegeList(options.formLearning)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.grade')}}:</td>
                  <td class="text-left-background-none">{{dataForm.currentGrade}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.mentor')}}:</td>
                  <td class="text-left-background-none">{{dataForm.teacherName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.category')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.professional')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorField}}</td>
                  
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipBase')}}:</td>
                  <td class="text-left-background-none">{{dataForm.baseName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.namePost')}}:</td>
                  <td class="text-left-background-none">{{dataForm.positionName}}</td>
                  
              </tr>
              <!-- <tr>
              <td class="text-left-background-none" colspan="4" ></td>
              </tr> -->
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.supervisor')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.outsideAdvisorName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipProgram')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.practiceContent}}</td>
              </tr>
              <tr>
                <td class="text-left-background-none" colspan="4" ></td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.fillMonth')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.reportMonth}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.adjunct')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">
                    <a> {{dataForm.enclosureFileName}} </a>
                      
                    </td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internProgress')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.content}}</td>
              </tr>
              <!-- <tr>
                  <td class="text-right-background-color">{{$t('myExamine.CurriculumAccreditationFile')}}:</td>
                  <td class="text-left-background-none" colspan="3">
                    <p v-for="item in dataForm.fileList" :key="item.fileId"> -->
                      <!-- <a @click="download(item.fileId)">{{item.fileName}}</a> -->
                    <!-- </p>
                  </td>
              </tr> -->
          </table>
         </div>
        </el-card>
        <el-card body-style="padding: 24px;" class="card-margin">
          <div style="padding: 0px 18px;">
             <h2 style="font-weight:bold">{{$t('internProgress.write')}}</h2>
             <el-form :model="internForm" label-width="114px" :rules="rules" ref="addform" label-suffix="：">
                <el-row >
                  <el-form-item :label="$t('internProgress.approval')" prop="">
                    <el-input
                      maxlength="325"
                      type="textarea"
                      :rows="5"
                      v-model="internForm.content" >
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row type="flex" class="row-bg" justify="end">
                  
                  <!-- <el-button @click="cancelDialog" v-if='dataProp==="特殊编辑"'>{{$t('graduate.cancel')}}</el-button> -->
                  <el-button type="danger"  @click="reject('校内导师审核')">{{$t('internProgress.reject')}}</el-button>
                  <el-button type="primary"  @click="transit('校内导师审核')" >{{$t('internProgress.transit')}}</el-button>
                </el-row>
              </el-form>
          </div>
          
        </el-card>
          <HistoryTable :tableData="tableData"></HistoryTable>
      </div>
      <el-dialog
        width="25%"
        ref="innerDialog"
        :title="$t('graduateBase.prompt')"
        :visible.sync="innerVisible"
        append-to-body
        :top="'28vh'">
        <div style="text-align: left;margin-bottom: 25px;">{{$t('graduateBase.cancelTip')}}</div>
        <div style="text-align: right;">
          <el-button type="primary" @click="confirmInner">{{$t('common.btn.confirm')}}</el-button>
          <el-button @click="cancelInner">{{$t('common.btn.cancel')}}</el-button>
          <el-button type="primary" @click="confirmAndClose">{{$t('graduateBase.saveAndClose')}}</el-button>
        </div>
      </el-dialog>
      <div class="edu-page-warp" v-if="key=='tutorReview'">
        <el-card v-loading="loading" body-style="padding: 24px;" class="card-margin">
          <el-row type="flex" class="row-bg" justify="space-between">

            <h2 style="font-weight:bold">{{$t('internProgress.internCompletion')}}</h2>
            <el-button @click="cancelIntern" >{{$t('graduate.cancel')}}</el-button>
          </el-row>
          <hr style="border-top: 2px solid #eee;">
         <div style="padding: 0px 18px;">

          <div  style="display: flex;justify-content: space-between;margin-bottom: 7px;">
            <p class="base-info-title">{{$t('internProgress.information')}}</p>
          </div>
          <table class="table-style-baseinfo">
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.name')}}:</td>
                  <td class="text-left-background-none">{{dataForm.name}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.studentNumber')}}:</td>
                  <td class="text-left-background-none">{{dataForm.studentId}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.college')}}:</td>
                  <td class="text-left-background-none">{{dataForm.collegeAcademy | collegeList(options.faculty)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.profession')}}:</td>
                  <td class="text-left-background-none">{{dataForm.major|collegeList(options.profesList)}}</td>
              </tr>
              <tr>
                <td class="text-right-background-color">{{$t('internProgress.trainingLevel')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingLevel|collegeList(options.TrainingLevel)}}</td>
                <td class="text-right-background-color">{{$t('internProgress.cultivationCategory')}}:</td>
                <td class="text-left-background-none"  >{{dataForm.trainingCategory|collegeList(options.trainingCategory)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.degreeType')}}:</td>
                  <td class="text-left-background-none">{{dataForm.degreeType|collegeList(options.degreeType)}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.waysOfLearning')}}:</td>
                  <td class="text-left-background-none">{{dataForm.formLearning|collegeList(options.formLearning)}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.grade')}}:</td>
                  <td class="text-left-background-none">{{dataForm.currentGrade}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.mentor')}}:</td>
                  <td class="text-left-background-none">{{dataForm.teacherName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.category')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.professional')}}:</td>
                  <td class="text-left-background-none">{{dataForm.majorField}}</td>
                  
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipBase')}}:</td>
                  <td class="text-left-background-none">{{dataForm.baseName}}</td>
                  <td class="text-right-background-color">{{$t('internProgress.namePost')}}:</td>
                  <td class="text-left-background-none">{{dataForm.positionName}}</td>
                  
              </tr>
              <!-- <tr>
              <td class="text-left-background-none" colspan="4" ></td>
              </tr> -->
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.supervisor')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.outsideAdvisorName}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internshipProgram')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.practiceContent}}</td>
              </tr>
              <tr>
                <td class="text-left-background-none" colspan="4" ></td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.fillMonth')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.reportMonth}}</td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.adjunct')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">
                    <a> {{dataForm.enclosureFileName}} </a>
                      
                    </td>
              </tr>
              <tr>
                  <td class="text-right-background-color">{{$t('internProgress.internProgress')}}:</td>
                  <td class="text-left-background-none" colspan="3" style="max-width: 300px; word-wrap: break-word; overflow: auto;">{{dataForm.content}}</td>
              </tr>
              <!-- <tr>
                  <td class="text-right-background-color">{{$t('myExamine.CurriculumAccreditationFile')}}:</td>
                  <td class="text-left-background-none" colspan="3">
                    <p v-for="item in dataForm.fileList" :key="item.fileId"> -->
                      <!-- <a @click="download(item.fileId)">{{item.fileName}}</a> -->
                    <!-- </p>
                  </td>
              </tr> -->
          </table>
         </div>
        </el-card>
        <el-card body-style="padding: 24px;" class="card-margin">
          <div style="padding: 0px 18px;">
             <h2 style="font-weight:bold">{{$t('internProgress.write')}}</h2>
             <el-form :model="internForm" label-width="114px" :rules="rules" ref="addform" label-suffix="：">
                <el-row >
                  <el-form-item :label="$t('internProgress.approval')" prop="">
                    <el-input
                      maxlength="325"
                      type="textarea"
                      :rows="5"
                      v-model="internForm.content" >
                    </el-input>
                  </el-form-item>
                </el-row>
                <el-row type="flex" class="row-bg" justify="end">
                  <el-button type="danger"  @click="reject('校内导师审核')">{{$t('internProgress.reject')}}</el-button>
                  <el-button type="primary"  @click="transit('校内导师审核')" >{{$t('internProgress.transit')}}</el-button>
                </el-row>
              </el-form>
          </div>
          
        </el-card>
          <HistoryTable :tableData="tableData"></HistoryTable>
      </div>
  </div>
</template>
<script>
import { queryDic } from "common/src/api/dictionary";
import UTILS from "common/src/utils/utils";
import {downloadfile} from "common/src/api/upload";
// import addDialog from 'common/src/views/graduateStudent/component/addDialog.vue';
import graduateStudent from 'common/src/api/graduateStudent/graduateStudent';
import HistoryTable from './HistoryTable'
export default {
  components: {
    HistoryTable
  },
  data () {
    let cannotEnter = (rule, value, callback) => {
      let reg = /[`$]/im;
      if (reg.test(value)) {
        return callback(new Error(this.$t('identificationToDoList.cannotContain')));
      } else if (value === '') {
        return callback(new Error(this.$t('internship.pleaseEnter')));
      }
      return callback();
    };
    return {
      indexKey: '1', // 面包屑
      title: '',
      progress: '',
      key: 'internshipList',
      teacher: '',
      addflag: false,
      innerVisible: false,
      dataForm: {},
      peopleadd: {},
      tableData: [],
      curRow: {},
      fileList: [],
      internForm: {
        content: '',
        enclosureFileName: '',
        enclosureFileUrl: '',
        reportMonth: ''
      },
      deriveBtn: false,
      addBtn: false,
      auditBtn: false,
      editBtn: false,
      detailsBtn: false,
      ifDetials: false,
      copyDialog: false,
      curCalendarId: '',
      isAllDel: true,
      exportButton: false,
      exportResult: null,
      multipleSelection: [],
      id: '',
      provideData: {}, // 提供子组件表格数据
      queryForm: {
        pageNum_: 1,
        pageSize_: 20,
        total_: 0,
        condition:{
          baseName: '',
          collegeAcademy: '',
          collegeAcademyList: [],
          major: '',
          status: '',
          reportMonthStart: '',
          reportMonthEnd: '',
          studentIdOrName: '',
          // trainingLevelList: [], // 培养层次
          // trainingTypeLisy: [], // 培养类别
          // degreeTypeList: [], // 学位类型
          // collegeAcademyList: [], // 学院
          majorList: [] // 专业
          // learnFormList: [] // 学习形式
        }
      },
      dataListProp: {},
      dataProp: '',
      copyTime: {
        time: ''
      },
      actNo: '',
      options: {
        TrainingLevel: [],
        degreeType: [],
        formLearning: [],
        faculty: [],
        profession: [],
        profesList: [],
        trainingCategory: []
      },
      loadList: [],
      auths: [],
      rowList: {},
      rules: {
        reportMonth: [
          { required: true, message: this.$t('internship.pleaseSelect'), trigger: 'change' }
        ],
        content: [
          { required: true, validator: cannotEnter, trigger: 'blur' }
        ],
        time: [
          {
            required: true,
            message: this.$t('graduate.optionRequired'),
            trigger: "change"
          }
        ]
      },
      dataList: [],
      breadPath: {
        label: this.$t('graduate.graduate'),
        key: "1",
        children: [
          {
            key: "2",
            label: ""
          }
        ]
      },
    }
  },
  filters: {
    collegeList(val, array) {
      let str = "";
      for (let item of array) {
        if (val === item.value) {
          str = item.label;
        }
      }
      return str;
    },
  },
  watch: {
    'auths': {
      handler: function(value) {
        this.auths.some(item => {
          if (item.authCode === 'internshipOrogress-deriveBtn') {
            // 导出
            this.deriveBtn = true;
          }
          if (item.authCode === 'internshipOrogress-addBtn') {
            // 新增
            this.addBtn = true;
          }
          if (item.authCode === 'internshipOrogress-auditBtn') {
            // 审核
            this.auditBtn = true;
          }
          if (item.authCode === 'internshipOrogress-editBtn') {
            // 编辑
            this.editBtn = true;
          }
          if (item.authCode === 'internshipOrogress-detailsBtn') {
            // 详情
            this.detailsBtn = true;
          }
        });
      }
    }
  },
  created() {
    this.getOptions();
    this.postInternshipSet(this.queryForm);
    this.auths = JSON.parse(localStorage.getItem("sessiondata")).auths;
    this.auths.some(item => {
      if (item.authCode === 'internshipOrogress-deriveBtn') {
        // 导出
        this.deriveBtn = true;
      }
      if (item.authCode === 'internshipOrogress-addBtn') {
        // 新增
        this.addBtn = true;
      }
      if (item.authCode === 'internshipOrogress-auditBtn') {
        // 审核
        this.auditBtn = true;
      }
      if (item.authCode === 'internshipOrogress-editBtn') {
        // 编辑
        this.editBtn = true;
      }
      if (item.authCode === 'internshipOrogress-detailsBtn') {
        // 详情
        this.detailsBtn = true;
      }
    });
    graduateStudent.getPracticeRoleBySession().then(res => {
      if (res.data) {
        this.teacher = res.data;
      }
    });
    graduateStudent.getSession().then(res => {
      this.id = res.data.realUid;
    });
  },
  methods: {
    // // 过滤$符号
    // checkSpecial(rule, value, callback) {
    //   let regEn = /[`$]/im;
    //   if (regEn.test(value)) {
    //     return callback(new Error(this.$t('identificationToDoList.cannotContain')))
    //   } else if (value === '') {
    //     return callback();
    //   } else {
    //     return callback();
    //   }
    // },
    getOptions() {
      // 筛选条件字典查询
      // :label="item.name"
      // :value="item.code"
      let data = {
        lang: this.$store.getters.language || "cn",
        type: "allChild",
        keys: ["X_PYCC", 'X_PYLB', 'X_XWLX', 'X_XXXS', 'X_YX']
      };
      queryDic(data).then(res => {
        UTILS.fillSelect(
          {
            trainingCategory: "X_PYLB",
            degreeType: "X_XWLX",
            formLearning: "X_XXXS",
            faculty: "X_YX",
            TrainingLevel: "X_PYCC"
          },
          res.data,
          this.options
        );
      });
    },
    // 专业选择
    majorChange(val) {
      if (this.queryForm.condition.majorList.length > 0) {
        this.queryForm.condition.major = this.queryForm.condition.majorList.join();
      } else {
        this.queryForm.condition.major = '';
      }
    },
    // 学院选择
    collegeChange(val) {
      if (this.queryForm.condition.collegeAcademyList.length > 0) {
        this.queryForm.condition.collegeAcademy = this.queryForm.condition.collegeAcademyList.join();
      } else {
        this.queryForm.condition.collegeAcademy = '';
      }
      // this.options.profession = [];
      // <el-tag :type=" props.row.customizeReason == 1 ? 'success' : 'danger'" >{{props.row.customizeReason == 1 ? $t('abnormal.configed') : $t('abnormal.unConfiged')}}</el-tag>
      this.queryForm.condition.majorList = [];
      if (val.length > 0) {

        let collegeList = val;
        graduateStudent.getDegreeByCollege(collegeList).then(res => {
          this.options.profession = res.data;
        });
      } else {
        this.options.profession = [];
      }
      
    },
    _fill(type, data) {
      for (const key in data) {
        this.options[type].push({
            value: key,
            label: data[key]
        });
      }
    },
    // 删除
    handleRemove() {
      this.internForm.enclosureFileName = '';
      this.internForm.enclosureFileUrl = '';
      this.fileList = [];
    },
    // 上传成功
    handleSuccess(res, file, fileList) {
      if(res.msg){
        this.$message({type: "info", message: res.msg});
      }else{
        this.$message({type: "success", message: this.$t('internship.successfully')});
        this.fileList = fileList
        this.setInformationAttachList(fileList);
      }
    },
    setInformationAttachList(fileList) {
      let attachList = [];
      fileList.forEach(item => {
        if (item.response && item.response.data) {
          const uploadedObj = item.response.data[item.name];
          if (uploadedObj) {
            this.internForm.enclosureFileName = uploadedObj.fileName;
            this.internForm.enclosureFileUrl = uploadedObj.objectkey;
          }
        }
      });
    },
    handlePreview() {
      // console.log(this.fileList);
      downloadfile(this.fileList[0].url);
    },
    // 获取列表
    postInternshipSet(data) {
      graduateStudent.internshipGetList(data).then(res => {
        this.dataList = res.data.list;
        // this.queryForm.pageNum_ = res.data.pageNum_;
        // this.queryForm.pageSize_ = res.data.pageSize_;
        this.queryForm.total_ = res.data.total_;
        
      });
    },
    // 筛选
    onSearch() {
      this.queryForm.pageNum_ = 1;
      this.postInternshipSet(this.queryForm);
    },
    // 重置
    resetSearch() {
      for (const key in this.queryForm.condition) {
        // if (key != 'calendarId') {
        //   this.queryForm.condition[key] = "";
        // }
        if (key === 'collegeAcademyList') {
          this.queryForm.condition.collegeAcademyList = [];
        } else if (key === 'majorList') {
          this.queryForm.condition.majorList = [];
        } else {
          this.queryForm.condition[key] = "";
        }
      }
      this.options.profession = '';
      this.queryForm.pageNum_ = 1;
      this.postInternshipSet(this.queryForm);
    },
    // 轮询直到获取key值的接口返回
    cycleToGetKey() {
      setTimeout(() => {
        let currentIds = [];
        if (this.multipleSelection.length > 0) {
          this.multipleSelection.forEach((element) => {
            currentIds.push(element.id);
          });
        } else {
          this.dataList.forEach((element) => {
            currentIds.push(element.id);
          });
        }
        graduateStudent.postPracticeSituaExport({
          "baseName": this.queryForm.condition.baseName,
          "collegeAcademy": this.queryForm.condition.collegeAcademyList.length > 0 ? this.queryForm.condition.collegeAcademyList.join() : this.queryForm.condition.collegeAcademy,
          "major": this.queryForm.condition.majorList.length > 0 ? this.queryForm.condition.majorList.join() : this.queryForm.condition.major,
          "status": this.queryForm.condition.status,
          "reportMonthStart": this.queryForm.condition.reportMonthStart,
          "selectRowIds": currentIds.length > 0 ? currentIds : [''],
          "reportMonthEnd": this.queryForm.condition.reportMonthEnd
        }).then(res => {
          if (res.success) {
            this.$refs.downloadRef.close();
            this.exportButton = false;
            this.normalDelayRequest(res.key, res.msg);
          } else {
            this.cycleToGetKey();
          }
        });
      }, 3000);
    },
    // 导出异步
    delayRequest(key, name) {
      setTimeout(() => {
        graduateStudent.downloadGetKey(key, name).then(res => {
          this.exportResult = res.data;
          if (res.code == 200 && res.data.status) {
            this.exportButton = false;
            let path =
              '/api/practiceservice/export/file?path=' +
              res.data.path + '&name=' + name;
            // window.open(path);
            window.location.href = path;
            this.$message.success(this.$t('result.exportSuccessfully'));
            this.$refs.downloadRef.close();
          } else {
            this.delayRequest(key, name);
          }
        });
      }, 3000);
    },
    // Normal导出异步
    normalDelayRequest(key, name) {
      setTimeout(() => {
        graduateStudent.downloadGetKey(key).then(res => {
          this.exportResult = res.data;
          if (res.code == 200 && res.data.status) {
            this.exportButton = false;
            let path =
              '/api/practiceservice/export/file?path=' +
              res.data.path + '&name=' + name;
            // window.open(path);
            window.location.href = path;
            this.$message.success(this.$t('result.exportSuccessfully'));
            this.$refs.downloadRef.close();
          } else {
            this.delayRequest(key, name);
          }
        });
      }, 3000);
    },
    // 导出
    exportFile(command) {
      // 1、第一步：调该接口，获取key值以及msg中的文件名
      // 2、第二步：将key值放入接口传参
      // 3、第三步：传入path值以及name(msg中的文件名)值，下载文件
      this.exportResult = null;
      this.$refs.downloadRef.open();
      this.exportButton = true;
      this.cycleToGetKey();
      
    },
    // 编辑提交
    editirmForm() {
      this.$refs['addform'].validate(valid => {
        if (valid) {
          let obj = Object.assign({}, this.dataForm, this.rowList, this.internForm);
          obj.code = this.dataForm.teacherId;
          graduateStudent.postPracticeSituation(obj).then(res => {
            this.$message.success(this.$t('internship.successfully'));
            this.innerVisible = false;
            this.$refs['addform'].resetFields();
            this.key = "internshipList";
            this.queryForm.pageNum_ = 1;
            this.postInternshipSet(this.queryForm);
          });
        }
      });
      
    },
    // 新增提交
    affirmForm() {
      this.$refs['addform'].validate(valid => {
        if (valid) {
          let obj = Object.assign({}, this.internForm, this.dataForm);
          obj.code = this.dataForm.teacherId;
          graduateStudent.getPracticeSituationAdd(obj).then(res => {
            this.$message.success(this.$t('internship.successfully'));
            this.innerVisible = false;
            this.$refs['addform'].resetFields();
            this.key = "internshipList";
            this.queryForm.pageNum_ = 1;
            this.postInternshipSet(this.queryForm);
          });
        }
      });
      
    },
    // 新增
    exportAdd() {
      this.key = 'newInternship';
      this.fileList = [];
      this.internForm.content = '';
      this.internForm.enclosureFileName = '';
      this.internForm.enclosureFileUrl = '';
      this.internForm.reportMonth = '';
      this.dataForm = {};
      graduateStudent.getPracticeSituation(this.id).then(res => {
        this.dataForm = res.data;
        let collegeList = [];
        this.options.profesList = [];
        if (this.dataForm.collegeAcademy) {
          collegeList = this.dataForm.collegeAcademy.split(',');
          graduateStudent.getDegreeByCollege(collegeList).then(resed => {
            if (resed.data.length > 0) {
              resed.data.forEach(el => {

                this.options.profesList.push({
                  label: el.name,
                  value: el.code
                });
              });
            }
          });
        }
      });
      
    },
    // 取消
    addCancel(data) {
      this.addflag = data;
    },
     // 内层弹出取消
    cancelInner() {
      this.innerVisible = false;
    },
    // 内层弹出确定
    confirmInner() {
      this.innerVisible = false;
      this.internForm.content = '';
      // this.$refs['addform'].resetFields();
      this.key = "internshipList";
    },
    // 内层弹出保存关闭
    confirmAndClose() {
      if (this.key === 'editInternship') {
        this.editirmForm();
      } else if (this.key === "newInternship") {
        this.affirmForm();
      }
    },
    // 驳回
    reject(data) {
      if (this.internForm.content.indexOf("$") < 0) {
        if (this.internForm.content) {
            let practiceIds = [];
            practiceIds.push({
              content: this.internForm.content,
              no: this.actNo
            });
            graduateStudent.internshipRefuse(practiceIds).then((data) => {
              this.$message({
                  type: "success",
                  message: this.$t('identificationToDoList.SuccessfulOperation')
              });
              
              this.postInternshipSet(this.queryForm);
              this.$refs['addform'].resetFields();
              this.key = "internshipList";
            });
        } else {
          this.$message({
              type: "error",
              message: this.$t('internProgress.approvalComments')
          });
        }
      } else {
        this.$message({
            type: "error",
            message: this.$t('identificationToDoList.cannotContain')
        });
      }
    }, 
    // 通过
    transit(data) {
      if (this.internForm.content.indexOf("$") < 0) {
        let practiceIds = [];
        // this.multipleSelection.forEach(el => {
        practiceIds.push({
          content: this.internForm.content,
          no: this.actNo
        });
        // });
        graduateStudent.internshipAgree(practiceIds).then((data) => {
          this.$message({
              type: "success",
              message: this.$t('identificationToDoList.SuccessfulOperation')
          });
         
          this.postInternshipSet(this.queryForm);
          this.$refs['addform'].resetFields();
          this.key = "internshipList";
        });
      } else {
        this.$message({
            type: "error",
            message: this.$t('identificationToDoList.cannotContain')
        });
      }
    },
    cancelIntern() {
      // let isEmpty = true;
      // for (let key in this.queryForm) {
      //   if (this.queryForm[key]) {
      //     isEmpty = false;
      //   }
      // }
      if (this.internForm.content) {
        this.innerVisible = true;
      } else {
        this.innerVisible = false;
        this.key = "internshipList";
        this.internForm.content = '';
        this.queryForm.pageNum_ = 1;
        this.postInternshipSet(this.queryForm);
      }
      // if (isEmpty) {
      //     this.innerVisible = false;
      //     this.key = "internshipList";
      //     this.queryForm.pageNum_ = 1;
      //     this.postInternshipSet(this.queryForm);
      // } else {
      //   this.innerVisible = true;
      // }
    },
    // 取消
    cancelDialogList() {
      let isEmpty = true;
      for (let key in this.queryForm) {
        if (this.queryForm[key]) {
          isEmpty = false;
        }
      }
        if (isEmpty) {
          this.innerVisible = false;
          this.key = "internshipList";
          this.queryForm.pageNum_ = 1;
          this.postInternshipSet(this.queryForm);
      } else {
        this.innerVisible = true;
      }
      
    },
    // 取消
    beforeClose(param) {
      this.$refs.addform.cancelDialog();
    },
    
    loadDone(data, val) {
      this.loadList = data;
      this.loadList.forEach(el => {
        if (el.id === val) {
          this.queryForm.condition.calendarName = el.fullName;
        }
      });
      this.postInternshipSet(this.queryForm);
    },
    changeInput(val) {
      this.loadList.forEach(el => {
        if (el.id === val) {
          this.queryForm.condition.calendarName = el.fullName;
        }
      });
    },
    initOptions() {
      innovativeApi.getAllFaculty().then(res => {
        this.options.facultys = res.data.map(item => {
          return {
            label: item.deptName,
            value: item.deptCode
          }
        });
      })
    },
    // async getCurrentTermCalendar(){
    //   return await SchoolCalendarApi.currentTermCalendar();
    // },
    handleSelectionChange(val) {
      this.multipleSelection = val;
      // this.multipleSelection.every((item) => {
      //   if (item.status == 0 || item.status == 3) {
      //     return this.isAllDel = true;
      //   } else {
      //     this.isAllDel = false;
      //   }
      // })
    },
    
    // 编辑
    editOutline(row) {
      this.rowList = row;
      this.key = 'editInternship';
      this.fileList = [];
      this.dataForm = {};
      graduateStudent.getPracticeSituationId(row.studentId, row.id).then(res => {
        this.dataForm = res.data;
        this.internForm.reportMonth = res.data.reportMonth;
        this.internForm.content = res.data.content;
        if (res.data.enclosureFileName) {

          this.fileList.push({
            name: res.data.enclosureFileName
          });
        }
        let collegeList = [];
        this.options.profesList = [];
        if (this.dataForm.collegeAcademy) {
          collegeList = this.dataForm.collegeAcademy.split(',');
          graduateStudent.getDegreeByCollege(collegeList).then(resed => {
            if (resed.data.length > 0) {
              resed.data.forEach(el => {

                this.options.profesList.push({
                  label: el.name,
                  value: el.code
                });
              });
            }
          });
        }
      });
    },
    
    // 详情
    detailsOutline(row) {
      this.key = 'detailsInternship';
      this.fileList = [];
      this.dataForm = {};
      graduateStudent.getPracticeSituationId(row.studentId, row.id).then(res => {
        this.dataForm = res.data;
        this.internForm.reportMonth = res.data.reportMonth;
        this.internForm.content = res.data.content;
        if (res.data.enclosureFileName) {

          this.fileList.push({
            name: res.data.enclosureFileName,
            url: res.data.enclosureFileUrl
          });
        }
        let collegeList = [];
        this.options.profesList = [];
        if (this.dataForm.collegeAcademy) {
          collegeList = this.dataForm.collegeAcademy.split(',');
          graduateStudent.getDegreeByCollege(collegeList).then(resed => {
            if (resed.data.length > 0) {
              resed.data.forEach(el => {

                this.options.profesList.push({
                  label: el.name,
                  value: el.code
                });
              });
            }
          });
        }
      });
    },
    // 审核
    checkOutline(row) {
      this.actNo = row.actNo;
      //  == 0">校外导师审核</span>
      // <span v-if="props.row.status == 1">校内导师审核</span>
      if (this.teacher === '3.1') {
        // 校内导师
        this.key = 'mentorReview';
        this.internForm.content = '';
        graduateStudent.getPracticeSituationId(row.studentId, row.id).then(res => {
            this.dataForm = res.data;
            let collegeList = [];
            this.options.profesList = [];
            if (this.dataForm.collegeAcademy) {
              collegeList = this.dataForm.collegeAcademy.split(',');
              graduateStudent.getDegreeByCollege(collegeList).then(resed => {
                if (resed.data.length > 0) {
                  resed.data.forEach(el => {

                    this.options.profesList.push({
                      label: el.name,
                      value: el.code
                    });
                  });
                }
              });
            }
        });
        graduateStudent.getPracticeGetActDetail(row.actNo).then(res => {
          this.tableData = res.data;
        });
      } else if (this.teacher === '3.2') {
        // 校外导师
        this.key = 'tutorReview';
        this.internForm.content = '';
        graduateStudent.getPracticeSituationId(row.studentId, row.id).then(res => {
            this.dataForm = res.data;
            let collegeList = [];
            this.options.profesList = [];
            if (this.dataForm.collegeAcademy) {
              collegeList = this.dataForm.collegeAcademy.split(',');
              graduateStudent.getDegreeByCollege(collegeList).then(resed => {
                if (resed.data.length > 0) {
                  resed.data.forEach(el => {

                    this.options.profesList.push({
                      label: el.name,
                      value: el.code
                    });
                  });
                }
              });
            }
        });
        graduateStudent.getPracticeGetActDetail(row.actNo).then(res => {
          this.tableData = res.data;
        });
      }
    },
    
    // 点击复制弹框确定
    diaSubmit() {
      this.$refs['copyTime'].validate(value => {
        if (value) {
          // undergraduategraduateApi.getTemplateById(copyTime.time).then((res) => {
          //   this.provideData = res.data;
          //   this.indexKey = '2';
          //   this.breadPath.children[0].label = this.$t('graduate.copy');
          //   this.ifEdit = true;
          //   this.$router.push({query:{row: this.curRow, flag: '4'}});
          //   this.diaCancel();
          // })
        }
      })
    },
    dialogClose() {
      this.copyDialog = false;
      this.$refs['copyTime'].resetFields();
    },
    
    handleSizeChange(val) {
      this.queryForm.pageNum_ = 1;
      this.queryForm.pageSize_ = val;
      this.postInternshipSet(this.queryForm);
    },
    handleCurrentChange(val) {
      this.queryForm.pageNum_ = val;
      this.postInternshipSet(this.queryForm);
    },
    reset() {
      
    },
  }
  
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.inner-breadcrumb {
    .breadcrumb {
        span {
            font-weight: normal;
            color: #aaa;
        }
        a {
            font-weight: normal;
            color: #aaa;
        }
        a:hover {
            color: #409eff;
        }
        .last {
            font-weight: bold !important;
            cursor: default !important;
        }
        .disable {
            cursor: default !important;
        }
    }
}
.condition-title-p {
    font-weight: 400;
    font-style: normal;
    color: #2b3b4e;
    font-size: 18px;
    margin-bottom: 15px;
}
.base-info-title {
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    color: #2b3b4e;
}
.table-style-baseinfo {
    background-color: rgba(210, 212, 214, 1);
    box-sizing: border-box;
    border-width: 0.5px;
    border-style: solid;
    border-color: rgba(210, 212, 214, 1);
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    width: 100%;
    font-weight: 401;
    font-style: normal;
    font-size: 14px;
    color: #8896a7;
    margin-bottom: 20px;
}
.table-style-baseinfo td {
    width: 25%;
    background-color: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-weight: 401;
    font-style: normal;
    font-size: 14px;
    color: #2b3b4e;
    height: 32px;
    padding: 0 10px;
}
.table-style-baseinfo .text-right-background-color {
    background-color: #fdfeff4d;
    text-align: right;
}
.text-left-background-none {
    text-align: left;
}
.condition-title {
  color: #2b3b4e;
  font-size: 18px;
  line-height: 24px;
  font-weight: bold;
}
  .edu-page-title {
    span {
      line-height: 24px;
      display: inline-block;
      padding-right: 10px;
      font-size: 18px;
      font-weight: bold;
      color: #2b3b4e;
    }
  }
  .sub-title {
    margin: 16px 0;
    font-size: 16px;
    color: #000020;
    letter-spacing: 0;
  }
  .form-item {
    width: 312px;
    height: 32px;
    float: left;
    margin: 0px 10px;
  }
  .inputBox{
    width: 240px!important;height: 32px!important;
  }
  .atooltip{
    background: beige;
    border: black;
  }
</style>
